package org.example.auth.model.entity;

import lombok.Getter;
import lombok.Setter;
import org.example.misc.model.CommonEntity;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "auth_role_authority")
@org.hibernate.annotations.Table(appliesTo = "auth_role_authority", comment = "角色权限表")
@Getter
@Setter
public class RoleAuthority {

    private static final long serialVersionUID = -5746720355337387675L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false)
    private Long id;

    @Column(nullable = false)
    private Long roleId;

    @Column(nullable = false)
    private Long authorityId;

    @Embedded
    private CommonEntity commonInfo;

}
